package me.jessyan.mvparms.demo.di.module.shoppcard;

import com.jess.arms.di.scope.ActivityScope;

import dagger.Module;
import dagger.Provides;

import me.jessyan.mvparms.demo.mvp.contract.shoppcard.ApplyStoreContract;
import me.jessyan.mvparms.demo.mvp.model.shoppcard.ApplyStoreModel;


@Module
public class ApplyStoreModule {
    private ApplyStoreContract.View view;

    /**
     * 构建ApplyStoreModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public ApplyStoreModule(ApplyStoreContract.View view) {
        this.view = view;
    }

    @ActivityScope
    @Provides
    ApplyStoreContract.View provideApplyStoreView() {
        return this.view;
    }

    @ActivityScope
    @Provides
    ApplyStoreContract.Model provideApplyStoreModel(ApplyStoreModel model) {
        return model;
    }
}